﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Navigation;
using Microsoft.Phone.Controls;
using Microsoft.Phone.Shell;

namespace ArmyCreator
{
    public partial class OffLineView : PhoneApplicationPage
    {
        public OffLineView()
        {
            InitializeComponent();
        }

        protected override void OnNavigatedTo(NavigationEventArgs e)
        {
            base.OnNavigatedTo(e);

            if (UserContext.Instance.IsOnline)
            {
                VisualStateManager.GoToState(this, "Online", true);
            }
            else
            {
                VisualStateManager.GoToState(this, "Offline", true);
            }
        }
    }
}